package com.guigu.chenjiajun.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.guigu.chenjiajun.service.DispatchOrderService;
import com.guigu.common.mapper.MManufactureMapper;
import com.guigu.common.pojo.MManufacture;
import com.guigu.common.vo.SearchVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class DispatchOrderServiceImpl implements DispatchOrderService {


    @Resource
    private MManufactureMapper mManufactureMapper;
    @Override
    public SearchVo<MManufacture> QueryDispatchOrder(SearchVo searchVo) {
        PageHelper.startPage(searchVo.getPageNumber(), searchVo.getPageSize());
        PageInfo p = new PageInfo(this.mManufactureMapper.QueryDispatchOrder(searchVo));
        searchVo.setRows(p.getList());
        searchVo.setTotal(p.getTotal());
        return searchVo;
    }
}
